home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
569
/
c_libs1a
/
c_libsa1.txt
< prev
next >
Wrap
Text File
|
1992-04-30
|
5KB
|
123 lines
C UTILITY LIBRARY A - VERSION 1
-------------------------------
After receiving suggestions from several people that I should
publish some generic C functions of mine I was glad to oblige. I
think the Atari line is a wonderful line of computers whose day
is just beginning to dawn as professional level applications
appear that deal with every monitor configuration and TOS version
correctly. I admit I'm rather a novice at C programming and only
lately have I felt I really had a grasp of it. But now, as I don't
have to concentrate too much on the fundamentals, I wised up and
started building custom librarys with fun little utility
functions.
Library A, as I am now calling it, contains two functions both
designed to extend the useability of the AES, namely,
form_ncenter(), and form_nalert().
form_ncenter() is essentially the same as form_center except that
upon entry the GRECT * contains the rectangle upon which the
object is centered. Basically this is useful if you wish to
center an object over a window or another object.
form_nalert() is an extension of form_alert. I added many options
which would add to the usefulness of this function. A custom
32x32 bitmap may be passed or the standard three may be
referenced. The input string is compatible with form_alert(). A
GRECT may be passed to cause form_ncenter() to be called or NULL
may be passed to force form_center.
CONTENTS OF ARCHIVE
-------------------
CLIBS_A1.TXT - This document.
ALERT.C - This is the C source to form_nalert() and form_ncenter().
It also contains two static functions ObjcExtent and
init().
ALERT.H - Required by above file.
NEWALERT.H - This contains function declarations and useful
defines you'll need to attach to your source.
DEMO.C - This is the source to a simple demo program demonstrating
form_nalert() and form_ncenter().
DEMO.PRG - This is a demo of the form_nalert() and
form_ncenter().
DEMO.RSC - We all know what this is for...
C BINDINGS
----------
Procedure Name: ret = form_nalert(rect,def,inp,nimg)
Input Data Types: GRECT *rect;
short def;
char *inp;
short nimg[64];
Return: ret = exit button ( 1, 2, or 3), <0 = error.
Usage: rect = NULL for form_center() otherwise
rectangle to center upon.
def = default exit button (same as
form_alert() ).
inp = character input string (same as
form_alert() except a value of 4 for
the icon specifies custom.) Buttons
have a maximum length of 10, text
lines, 30.
nimg = 32x32 icon data or NULL if icon value
is 0-3.
---------------------
Procedure Name: form_ncenter(tree,rect)
Data Types: OBJECT *tree;
GRECT *rect;
Return: Places clip rectangle for objc_draw() in rect.
Input: tree = pointer to object tree.
rect = rectangle to center around.
---------------------
LICENSE
-------
Software Development Systems will allow you to incorporate this code
into your own programs without fee. You may not, however, modify or
redistribute this code in any manner except in its original form and
completely intact. Usage of these routines in your programs does not
constitute endorsement or connection of Software Development Systems
to your company/self.
DISCLAIMER
----------
Please understand, these procedures are by no means well tested.
Neither Software Development Systems nor Scott Sanders will be held
liable for any damages either incidental or consequential resulting
from the use of these programs. If you use these procedures in your
own programs, use them with care and test them yourself carefully.
If you have any comments or bug reports contact me at:
Scott Sanders
Software Development Systems
996 Redondo Ave. #404
Long Beach, CA 90804
GENIE: S.SANDERS2
THE FUTURE
----------
If I get enough requests I will also release librarys with some of my
favorite custom APPLBLK's and a Popup menu routine (like XCONTROL).